package com.shangxian.giveithome.mapper;


import com.shangxian.giveithome.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MechanismMapper {

    /**
     * 根据筛选条件查询
     *
     * @param mechanismScreen
     * @param pageNum
     * @param pages
     * @return
     */
    List<MechanismList> queryByScreen(@Param("mechanismScreen") MechanismScreen mechanismScreen, @Param("pageNum") Integer pageNum, @Param("pages") Integer pages);

    /**
     * 根据id查询机构信息
     *
     * @param id
     * @return
     */
    Mechanism queryById(Long id);

    /**
     * 查询总条数
     *
     * @param mechanismScreen
     * @return
     */
    Integer queryCount(MechanismScreen mechanismScreen);

    /**
     * 查看不包含已查询的数据
     *
     * @param mechanismScreen
     * @param pageNum
     * @param pages
     * @return
     */
    List<MechanismList> queryByScreenNotSize(@Param("mechanismScreen") MechanismScreen mechanismScreen, @Param("pageNum") Integer pageNum, @Param("pages") Integer pages);

    /**
     * 查看不包含已查询的条数
     *
     * @param mechanismScreen
     * @return
     */
    Integer queryCountNotSize(MechanismScreen mechanismScreen);

    /**
     * 根据id查询活动详情相关数据
     *
     * @param mechanismId
     * @return
     */
    Mechanism queryByActivityMechanism(Long mechanismId);

    List<String> queryPower();

    List<MechanismList> queryPrivilege();

    List<MechanismVolunteer> queryAllMechanismAndVolunteer(@Param("pageNum") Integer pageNum, @Param("pages") Integer pages);

    Integer queryALlMechanismCount();

    Integer searchMechanismExistence(String name);

    Long create(MechanismSing mechanismSing);

    void MechanismDataSave(Long aLong);

    Integer updateMechanism(MechanismSing mechanismSing);

    void updateMechanismData(Long mechanismId);

    void updateMechanismDataD(Long aLong);

    String queryByVolunteerId(Long me_id);
}
